class UsertagsConfigData {
  String? title;
  int? tagsMaxNum;
  List<String>? list;
  List<TagOptions>? options;

  UsertagsConfigData({this.title, this.tagsMaxNum, this.list, this.options});

  UsertagsConfigData.fromJson(Map<String, dynamic> json) {
    if (json["title"] is String) {
      title = json["title"];
    }
    if (json["tagsMaxNum"] is num) {
      tagsMaxNum = (json["tagsMaxNum"] as num).toInt();
    }
    if (json["list"] is List) {
      list = json["list"] == null ? null : List<String>.from(json["list"]);
    }
    if (json["options"] is List) {
      options = json["options"] == null ? null : (json["options"] as List).map((e) => TagOptions.fromJson(e)).toList();
    }
  }

  static List<UsertagsConfigData> fromList(List<Map<String, dynamic>> list) {
    return list.map(UsertagsConfigData.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> json = <String, dynamic>{};
    json["title"] = title;
    json["tagsMaxNum"] = tagsMaxNum;
    if (list != null) {
      json["list"] = list;
    }
    if (options != null) {
      json["options"] = options?.map((e) => e.toJson()).toList();
    }
    return json;
  }
}

class TagOptions {
  String? tags;
  List<TagSubs>? subs;

  TagOptions({this.tags, this.subs});

  TagOptions.fromJson(Map<String, dynamic> json) {
    if (json["tags"] is String) {
      tags = json["tags"];
    }
    if (json["subs"] is List) {
      subs = json["subs"] == null ? null : (json["subs"] as List).map((e) => TagSubs.fromJson(e)).toList();
    }
  }

  static List<TagOptions> fromList(List<Map<String, dynamic>> list) {
    return list.map(TagOptions.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> json = <String, dynamic>{};
    json["tags"] = tags;
    if (subs != null) {
      json["subs"] = subs?.map((e) => e.toJson()).toList();
    }
    return json;
  }
}

class TagSubs {
  String? title;

  TagSubs({this.title});

  TagSubs.fromJson(Map<String, dynamic> json) {
    if (json["title"] is String) {
      title = json["title"];
    }
  }

  static List<TagSubs> fromList(List<Map<String, dynamic>> list) {
    return list.map(TagSubs.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> json = <String, dynamic>{};
    json["title"] = title;
    return json;
  }
}
